# 在终端输入python manage.py shell后，粘贴如下指令并回车，导入数据


from user.models import UserInfo

UserInfo.objects.all().delete()


user_info = [
    {
        'username': 'customer1',
        'password': 123456,
        'email': 'admin@mail.nankai.edu.com',
        'mobile_phone': 15906090786,
        'profile_img': 'doge.png',
        'identity': 'user',
    },
    {
        'username': 'owner',
        'password': 123456,
        'email': 'admin@mail.nankai.edu.com',
        'mobile_phone': 13805959032,
        'profile_img': 'doge.png',
        'identity': 'owner',
    },
]


for data in user_info:
    info = UserInfo()
    info.username = data['username']
    info.password = data['password']
    info.email = data['email']
    info.mobile_phone = data['mobile_phone']
    info.profile_img = data['profile_img']
    info.identity = data['identity']
    info.save()